<?php


class baoZhuang_ZSClear extends CI_Controller
{
    private $tableName;


    public function __construct()
    {
        parent::__construct();
        $this->tableName = "xunjian_bz_zswql";
    }

    public function index(){
        $this->load->model();
    }
    public function dataAllList(){
        $listAll = array();
        $listall = $this->Data_model->get_data(array(),'','',0,0,$this->tableName);
        $new_list = array();
        $i = 1;
        foreach ($listall as $value) {
            $value['lid'] = $i;
            $i++;
            array_push($new_list, $value);
        }
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $res = array(
            'list'    => $new_list,
            'config'  => $info,
        );
        $this->load->view('rbReport/baoZhuang_ZSClearList',$res);
    }

    public function getSingleContent(){
        $get = $this->input->get();
        $id = $get['id'];
        $data = $this->Data_model->get_single_data(array('id' => $id),$this->tableName);
        $data["createTime"] = date("Y-m-d H:i:s",$data['createTime']);
        echo json_encode($data);
    }
}